<template>
    <div>
        这是主页
        <div><button @click='logout'>退出</button></div>
    </div>
</template>
<script>
export default {
    methods: {
        logout:function(){
            window.sessionStorage.clear()
            this.$router.push('/login')
        }
    },
}
</script>